package edu.hitsz.aircraft;

import edu.hitsz.StartGame;
import edu.hitsz.application.Game;
import edu.hitsz.application.Main;
import edu.hitsz.application.MusicThread;
import edu.hitsz.bullet.AbstractBullet;
import edu.hitsz.bullet.EnemyBullet;
import edu.hitsz.observerpattern.Subscriber;
import edu.hitsz.prop.AbstractProp;
import edu.hitsz.strategyshoot.Context;
import edu.hitsz.strategyshoot.SpreadShoot;
import edu.hitsz.strategyshoot.StraightShoot;

import java.util.LinkedList;
import java.util.List;

/**
 * Boss机
 * 在x轴方向上移动
 * 可以射击
 */
public class BossEnemy extends AbstractEnemy{

    /**
     * @param locationX  Boss机位置x坐标
     * @param locationY Boss机位置y坐标
     * @param speedX Boss机射出的子弹的基准速度
     * @param speedY Boss机射出的子弹的基准速度
     * @param hp    Boss机生命值
     * @param shootNum 单次射击的子弹数量
     * @param power 子弹伤害
     * @param direction 子弹运动方向
     */
    public BossEnemy(int locationX, int locationY, int speedX, int speedY, int hp,int shootNum,int power,int direction) {
        super(locationX, locationY, speedX, speedY, hp,shootNum,power,direction);
        this.context = new Context(new SpreadShoot());
    }

    @Override
    public List<AbstractBullet> shoot() {
        return context.shoot(this,power,direction,shootNum);
    }
}
